<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<HTML>
	<HEAD>
		<TITLE>编辑用户组</TITLE>
		<LINK href="<%=request.getContextPath()%>/jsp/manage/css/style.css" type=text/css rel=stylesheet>
	</HEAD>
	<script type="text/javascript">
	function CheckForm(){
		var str;
		str=document.myform.name.value.replace(/\s+/g, '');
		if (str==''){
		   alert('姓名不能为空！');
		   document.myform.name.focus();
		   return false;
		}
		str=document.myform.password.value.replace(/\s+/g, '');
		if (str==''){
		   alert('密码不能为空！');
		   document.myform.password.focus();
		   return false;
		}
		if (!checkPWD(form.pw1.value)) {
			alert("错误！密码必须是字母数字或_！");
			return false;
		}
		str=document.myform.email.value.replace(/\s+/g, '');
		if (str==''){
		   alert('EMail不能为空！');
		   document.myform.email.focus();
		   return false;
		}else{
		    if(document.myform.email.value.indexOf("@")==-1||document.myform.email.value.indexOf(".")==-1)
		    {
		       window.alert("请输入正确的E-mail地址！")
		       document.myform.email.focus();
		       return false;
		    }
		 }
		return true;  
	}
	function checkPWD(input)
	{
	        var checkOK = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
	        var checkStr = input;
	        for (i=0;i < checkStr.length;i++)
	        {
	                ch = checkStr.charAt(i);
	
	                for (j = 0;  j < checkOK.length;  j++)
	                        if (ch == checkOK.charAt(j))
	                                break;
	            if (j == checkOK.length)
	                  {
	                        return 0;
	                        break;
	                }
	        }
	        return 1;
	 }
	</script>
	<BODY topMargin="0" marginheight="0" marginwidth="0">

		<FORM name="myform" onsubmit="return CheckForm();" method="post" target="_self"
			action="<%=request.getContextPath()%>/quanxianManage.do?method=groupeditsave&id=${group.id}">
			<TABLE class="border" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<TBODY>
					<TR class="topbg">
						<TD height=22 colSpan=2 align=middle><STRONG>编辑用户组</STRONG><br></TD>
					</TR>
					<TR align=middle>
						<TD>
							<TABLE cellSpacing=1 cellPadding=2 width="100%" border=0>
								<TBODY>
									<TR class=tdbg>
										<TD align=right width=9%>
											&nbsp;
										</TD>
										<TD colspan="10">
											<FONT color=#ff0000><STRONG>注意<font
													color="#0000ff">*的内容必须填</font> </STRONG> </FONT>
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=120>
											<STRONG>组名称：</STRONG>
										</TD>
										<TD colSpan=2>
											<input id='groupName' maxlength=255 size=50 name="groupName" value=${group.groupName} >
											<FONT color=#ff0000>*</FONT>
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=120>
											<STRONG>描述：</STRONG>
										</TD>
										<TD colSpan=2>
											<input id="descn" maxlength=255 size=50 name="descn"  value=${group.descn} >
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=120>
											<STRONG>权限：</STRONG>
										</TD>
										<TD colSpan=2>
										<TABLE cellSpacing=1 cellPadding=2 width="100%" border=0>
										<TBODY>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_QUANXIAN=='ROLE_QUANXIAN'}">
													<input type="checkbox" name="quanxian" value="ROLE_QUANXIAN" checked>权限管理<br />
													</c:if>
													<c:if test="${ROLE_QUANXIAN==null}">
													<input type="checkbox" name="quanxian" value="ROLE_QUANXIAN" >权限管理<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_QUANXIAN_SHENHE=='ROLE_QUANXIAN_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_QUANXIAN_SHENHE" checked>权限管理审核权<br />
													</c:if>
													<c:if test="${ROLE_QUANXIAN_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_QUANXIAN_SHENHE" >权限管理审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_TYPE=='ROLE_TYPE'}">
													<input type="checkbox" name="quanxian" value="ROLE_TYPE" checked>类型管理<br />
													</c:if>
													<c:if test="${ROLE_TYPE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_TYPE" >类型管理<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_TYPE_SHENHE=='ROLE_TYPE_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_TYPE_SHENHE" checked>类型管理审核权<br />
													</c:if>
													<c:if test="${ROLE_TYPE_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_TYPE_SHENHE" >类型管理审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_NEWS=='ROLE_NEWS'}">
													<input type="checkbox" name="quanxian" value="ROLE_NEWS" checked>最新消息<br />
													</c:if>
													<c:if test="${ROLE_NEWS==null}">
													<input type="checkbox" name="quanxian" value="ROLE_NEWS" >最新消息<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_NEWS_SHENHE=='ROLE_NEWS_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_NEWS_SHENHE" checked>最新消息审核权<br />
													</c:if>
													<c:if test="${ROLE_NEWS_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_NEWS_SHENHE" >最新消息审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_LIBNEWS=='ROLE_LIBNEWS'}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBNEWS" checked>馆内消息<br />
													</c:if>
													<c:if test="${ROLE_LIBNEWS==null}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBNEWS" >馆内消息<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_LIBNEWS_SHENHE=='ROLE_LIBNEWS_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBNEWS_SHENHE" checked>馆内消息审核权<br />
													</c:if>
													<c:if test="${ROLE_LIBNEWS_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBNEWS_SHENHE" >馆内消息审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_CUSTOM=='ROLE_CUSTOM'}">
													<input type="checkbox" name="quanxian" value="ROLE_CUSTOM" checked>定制模块<br />
													</c:if>
													<c:if test="${ROLE_CUSTOM==null}">
													<input type="checkbox" name="quanxian" value="ROLE_CUSTOM" >定制模块<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_CUSTOM_SHENHE=='ROLE_CUSTOM_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_CUSTOM_SHENHE" checked>定制模块审核权<br />
													</c:if>
													<c:if test="${ROLE_CUSTOM_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_CUSTOM_SHENHE" >定制模块审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_FAQ=='ROLE_FAQ'}">
													<input type="checkbox" name="quanxian" value="ROLE_FAQ" checked>常见问题<br />
													</c:if>
													<c:if test="${ROLE_FAQ==null}">
													<input type="checkbox" name="quanxian" value="ROLE_FAQ" >常见问题<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_FAQ_SHENHE=='ROLE_FAQ_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_FAQ_SHENHE" checked>常见问题审核权<br />
													</c:if>
													<c:if test="${ROLE_FAQ_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_FAQ_SHENHE" >常见问题审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_BOOKREVIEW=='ROLE_BOOKREVIEW'}">
													<input type="checkbox" name="quanxian" value="ROLE_BOOKREVIEW" checked>新书简介<br />
													</c:if>
													<c:if test="${ROLE_BOOKREVIEW==null}">
													<input type="checkbox" name="quanxian" value="ROLE_BOOKREVIEW" >新书简介<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_BOOKREVIEW_SHENHE=='ROLE_BOOKREVIEW_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_BOOKREVIEW_SHENHE" checked>新书简介审核权<br />
													</c:if>
													<c:if test="${ROLE_BOOKREVIEW_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_BOOKREVIEW_SHENHE" >新书简介审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_HOTLINK=='ROLE_HOTLINK'}">
													<input type="checkbox" name="quanxian" value="ROLE_HOTLINK" checked>常用链接和相关链接<br />
													</c:if>
													<c:if test="${ROLE_HOTLINK==null}">
													<input type="checkbox" name="quanxian" value="ROLE_HOTLINK" >常用链接和相关链接<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_HOTLINK_SHENHE=='ROLE_HOTLINK_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_HOTLINK_SHENHE" checked>常用链接和相关链接审核权<br />
													</c:if>
													<c:if test="${ROLE_HOTLINK_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_HOTLINK_SHENHE" >常用链接和相关链接审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_LIBADDR=='ROLE_LIBADDR'}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBADDR" checked>通讯录<br />
													</c:if>
													<c:if test="${ROLE_LIBADDR==null}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBADDR" >通讯录<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_LIBADDR_SHENHE=='ROLE_LIBADDR_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBADDR_SHENHE" checked>通讯录审核权<br />
													</c:if>
													<c:if test="${ROLE_LIBADDR_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_LIBADDR_SHENHE" >通讯录审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_USERINFO=='ROLE_USERINFO'}">
													<input type="checkbox" name="quanxian" value="ROLE_USERINFO" checked>个人资料<br />
													</c:if>
													<c:if test="${ROLE_USERINFO==null}">
													<input type="checkbox" name="quanxian" value="ROLE_USERINFO" >个人资料<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_USERINFO_SHENHE=='ROLE_USERINFO_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_USERINFO_SHENHE" checked>个人资料审核权<br />
													</c:if>
													<c:if test="${ROLE_USERINFO_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_USERINFO_SHENHE" >个人资料审核权<br />
													</c:if>
												</TD>
											</TR>
											<TR class=tdbg>
												<TD  width=180>
													<c:if test="${ROLE_FEEDBACK=='ROLE_FEEDBACK'}">
													<input type="checkbox" name="quanxian" value="ROLE_FEEDBACK" checked>留言板<br />
													</c:if>
													<c:if test="${ROLE_FEEDBACK==null}">
													<input type="checkbox" name="quanxian" value="ROLE_FEEDBACK" >留言板<br />
													</c:if>
												</TD>
												<TD colSpan=2>
													<c:if test="${ROLE_FEEDBACK_SHENHE=='ROLE_FEEDBACK_SHENHE'}">
													<input type="checkbox" name="quanxian" value="ROLE_FEEDBACK_SHENHE" checked>留言板审核权<br />
													</c:if>
													<c:if test="${ROLE_FEEDBACK_SHENHE==null}">
													<input type="checkbox" name="quanxian" value="ROLE_FEEDBACK_SHENHE" >留言板审核权<br />
													</c:if>
												</TD>
											</TR>
										</TBODY>
										</TABLE>	
										
										</TD>
									</TR>
								</TBODY>
							</TABLE>
						</TD>
					</TR>
					<tr align="center">
						<td colspan="2">
							<INPUT id="Save" style="CURSOR: hand" type="submit" value="添加" name="Save">
							<INPUT id="Cancel" style="CURSOR: hand" type="reset" value="取消" name="Cancel" 
								onclick="window.location.reload('<%=request.getContextPath()%>/quanxianManage.do?method=grouplist') " >
						</td>
					</tr>
				</TBODY>
			</TABLE>
			<BR>
		</FORM>
	</BODY>
</HTML>
